from traineeskill import TraineeSkill
from trainee import Trainee

def CalcA(ts:TraineeSkill,trainee:Trainee)->int:
    S = 0
    for index in range(20):
        factor = (20 - index)*1.20
        item = ts.GetItem(trainee.skills[index])
        score = item[1][2] * factor
        trainee.SetSkillScore(index,score)
        S += score
        trainee.SetScore(S)
    return S